glTron Networking Protocol

This is the documentation of the gltron networking protocol.

Session Management

A typical session looks like this:
  1. Client connects to server
  2. Server acknowledges client and puts client into wait state
  3. Server sends client all information about the game rules and the connected players
  4. Server puts client into observer state. Client receives a snapshot of the game's data (i.e. the game history) and all further events related to that game.
  5. A game has ended. Server puts all clients into wait state.
  6. Server prepares new game. All participating clients go into pre-game state. All the others stay in wait state.
  7. Server starts new game. All participating clients go in to game state. All other clients go into observer state.

Client States

Server States

Messages: Server to Client

Messages: Client to Server